package ThaumPerditio.client.renderer.item;


import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.client.IItemRenderer;
import org.lwjgl.opengl.GL11;

public class ItemDefusionPedestalRenderer implements IItemRenderer {

    private TileEntity tile;
    private TileEntitySpecialRenderer tesr;

    public ItemDefusionPedestalRenderer(TileEntity tile, TileEntitySpecialRenderer tesr){
        this.tile = tile;
        this.tesr = tesr;
    }

    @Override
    public boolean handleRenderType(ItemStack item, ItemRenderType rt){
        return true;
    }

    @Override
    public boolean shouldUseRenderHelper(ItemRenderType rt, ItemStack item, ItemRendererHelper rh){
        return true;
    }

    @Override
    public void renderItem(ItemRenderType rt, ItemStack item, Object... data){
        GL11.glPushMatrix();
        GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
        TileEntityRendererDispatcher.instance.renderTileEntityAt(tile, 0, 0, 0, 0);
        GL11.glPopMatrix();
    }

}
